<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xn="http://www.renren.com/2009/xnml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link href="{{ staticUrl }}/img/favicon.ico" rel="itgeeker favorite icon" type="image/x-icon" />
    <link href="{{ staticUrl }}/css/layout.css?ver={{ cssVersion }}" rel="stylesheet" type="text/css" media="all" />
    <link href="{{ staticUrl }}/css/profile.css?ver={{ cssVersion }}" rel="stylesheet" type="text/css" media="all" />
    <script type="text/javascript" src="{{ staticUrl }}/js/base.js?ver={{ jsVersion }}"></script>
    <script type="text/javascript" src="{{ staticUrl }}/js/profile.js?ver={{ jsVersion }}"></script>
    <script type="text/javascript" src="http://static.connect.renren.com/js/v1.0/FeatureLoader.jsp"></script>
    <title>ITGeeker——我的主页！</title>
</head>
<body>
    {% include "inc/top_bar.inc" %}
    <div class="content_wrapper">
        <div id="content" class="content">
            <div class="profile_left">
                <div class="profile_pic">
                    {% if xnMainPhotoWithLogo %}
                        <a target="_blank" href="{{ xiaoneiProfilePrefix }}{{ profile_owner }}"><img src="{{ xnMainPhotoWithLogo }}" alt="{{ xnName }}" /></a>
                    {% else %}
                        <xn:profile-pic uid="{{ profile_owner }}" size="main" connect-logo="true"></xn:profile-pic>
                    {% endif %}
                </div>
                <div class="f_list">
                    <span>
                {% if profile_owner %}
                    {% if not is_me %}
                        <span><a target="_blank" href="{{ xiaoneiProfilePrefix }}{{ profile_owner }}">给Ta留言</a></span>
                    {% endif %}
                {% endif %}
                    </span>
                </div>
                <div class="f_list">
                    <div class="f_list_panel">
                        <div class="f_list_title">我的{% if not is_me %}其他{% endif %}好友：</div>
                        <div id="f_list_pics" class="f_list_pics">
                        </div>
                    </div>
                </div>
            </div>
            <div class="profile_right">
                {% include "inc/nav_bar.inc" %}
                <div class="paperlist_wrapper">
                    {% if errMsg %}
                        <p class="err_msg">{{errMsg}}</p>
                    {% else %}
                        {% include "inc/paperlist.inc" %}
                    {% endif %}
                </div>
            </div>
            <div style="clear:both"></div>
        </div>
    </div>
    {% include "inc/footer.inc" %}
    <script type="text/javascript">
        XN_RequireFeatures(["Api"], function(){
            XN.Main.init("{{ api_key }}", "/channel/xd_receiver.html");
            XN.Main.get_sessionState().waitUntilReady(function() {
                XN.Main.apiClient.friends_getAppFriends(['uid','name','tinyurl'], function (result, ex) {
                    if (!ex) {
                        renderFriendList($('f_list_pics'), result, {{ profile_owner }});
                    }
                    else {
                        $('f_list_pics').innerHTML = '抱歉，无法获得你的好友列表:(';
                    }
                }); 
            });
        });
    </script>
</body>
</html>
